<?php
use yii\helpers\Html;
use  yii\helpers\Url;
$this->title = 'expert';
?>
<!-- <?php //var_dump($data);?>
 -->
<link rel="stylesheet" type="text/css" href="css/expert.css">
<div class="container">
    <div class="expert-main" >
        <?php $length=count($data); if($length>0):?>
            <?php for ($i=0; $i <$length ; $i++) { ?>
                <!-- 需要去掉左边 -->
                <?php if($i%2==0):?>
                     <div class="expert" style="margin-left: 0;">
                <?php else:?>
                     <div class="expert">
                <?php endif;?>           
                    <img src="images/experts/<?php echo $data[$i]['id'] ;?>.jpg">
                    <div class="name"><?php echo $data[$i]['name']; ?> &nbsp;&nbsp;<span style="color: #888; font-size: 14px;"><?php echo $data[$i]['title']; ?></span></div>
                    <div class="text">
                        <p><?php echo $data[$i]['desp']; ?></p>
                    </div>
                    <div class="score">
                        <span>评分:&nbsp;&nbsp;<?php echo $data[$i]['score']; ?>分&nbsp;&nbsp;</span>
                        <span>&nbsp;&nbsp;预约价格:&nbsp;&nbsp;<?php echo $data[$i]['price']; ?>/小时</span>
                    </div>
                    <input class="btn" type="button" name="" value="立即预约">
                </div>
        <?php }else:?>

            <p style="font-size: 30px; text-align: center;color: red">暂时还没有专家入驻！</p>
        <?php endif;?>


<!-- 

        <div class="expert" style="margin-left: 0;">
            <img src="images/experts/1.jpg">
            <div class="name">朱晓燕 &nbsp;&nbsp;<span style="color: #888; font-size: 14px;">心理咨询师</span></div>
            <div class="text">
                <p>华中师范大学心理学院教育心理学硕士；国家二级心理咨询师。曾在金色摇篮潜能教育集团负责教师培训，担任金色摇篮东区国际园的园长。现任摇篮思慧特幼儿园园长。</p>
            </div>
            <div class="score">
                <span>评分:&nbsp;&nbsp;4.5分&nbsp;&nbsp;</span>
                <span>&nbsp;&nbsp;预约价格:&nbsp;&nbsp;100元/小时</span>
            </div>
          
            <input class="btn" type="button" name="" value="立即预约">
            
        </div>
      
        <div class="expert">
            <img src="images/experts/2.jpg">
            <div class="name">朱晓燕  &nbsp;&nbsp;<span style="color: #888; font-size: 14px;">心理咨询师</span></div>
            <div class="text">
                <p>华中师范大学心理学院教育心理学硕士；国家二级心理咨询师。曾在金色摇篮潜能教育集团负责教师培训，担任金色摇篮东区国际园的园长。现任摇篮思慧特幼儿园园长。</p>
            </div>
            <div class="score">
                <span>评分:&nbsp;&nbsp;4.5分&nbsp;&nbsp;</span>
                <span>&nbsp;&nbsp;预约价格:&nbsp;&nbsp;100元/小时</span>
            </div>
          
            <input class="btn" type="button" name="" value="立即预约">
            
        </div> -->
    </div>
</div>

<!-- <div style="width: 100%;height: 200px;"></div> -->




















